package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 租户基本信息表单对象
 *
 * @author youlaitech
 * @since 2025-11-22 08:24
 */
@Getter
@Setter
@Schema(description = "租户基本信息表单对象")
public class SysTenantForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "租户ID")
    @NotNull(message = "租户ID不能为空")
    private Long id;

    @Schema(description = "租户编码（唯一标识）")
    @NotBlank(message = "租户编码（唯一标识）不能为空")
    @Size(max=50, message="租户编码（唯一标识）长度不能超过50个字符")
    private String tenantCode;

    @Schema(description = "租户名称")
    @NotBlank(message = "租户名称不能为空")
    @Size(max=100, message="租户名称长度不能超过100个字符")
    private String tenantName;

    @Schema(description = "工厂名称")
    @NotBlank(message = "工厂名称不能为空")
    @Size(max=100, message="工厂名称长度不能超过100个字符")
    private String factoryName;

    @Schema(description = "联系人姓名")
    @NotBlank(message = "联系人姓名不能为空")
    @Size(max=64, message="联系人姓名长度不能超过64个字符")
    private String contactName;

    @Schema(description = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Size(max=20, message="手机号长度不能超过20个字符")
    private String mobilePhone;

    @Schema(description = "邮箱")
    @Size(max=128, message="邮箱长度不能超过128个字符")
    private String email;

    @Schema(description = "工厂地址")
    @Size(max=255, message="工厂地址长度不能超过255个字符")
    private String address;

    @Schema(description = "工厂人数")
    private Integer employeeCount;

    @Schema(description = "行业类型")
    @Size(max=50, message="行业类型长度不能超过50个字符")
    private String industryType;

    @Schema(description = "申请人OpenID（关联global_sys_user.openid）")
    @Size(max=28, message="申请人OpenID（关联global_sys_user.openid）长度不能超过28个字符")
    private String applicantOpenid;

    @Schema(description = "申请人用户ID（关联global_sys_user.id）")
    private Long applicantUserId;

    @Schema(description = "租户状态：1-正常 2-试用 3-已过期 0-已禁用")
    private Integer status;

    @Schema(description = "过期时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    @Schema(description = "套餐类型：1-免费版 2-基础版 3-专业版 4-企业版")
    private Integer packageType;

    @Schema(description = "最大用户数限制")
    private Integer maxUsers;

    @Schema(description = "最大存储空间(字节)，默认1GB")
    private Long maxStorage;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "更新人ID")
    private Long updateBy;

    @Schema(description = "逻辑删除(1-已删除 0-未删除)")
    @NotNull(message = "逻辑删除(1-已删除 0-未删除)不能为空")
    private Integer isDeleted;


}
